package com.datang.springcode.depends_on;

import org.springframework.context.annotation.*;

@Configuration
@ImportResource(value = {"classpath:depends_on.xml"})
@ComponentScan(value = {"com.datang.springcode.depends_on"})
public class DependsOnConfig {

    @Bean(value = {"phone"})
    @DependsOn(value = {"charger"})
    public Phone getPhone() {
        return new Phone();
    }

    @Bean(value = {"charger"})
    public Charger getCharger() {
        return new Charger();
    }

}
